import api from "../request.js";

// 获取可加入的互助计划(NOAUTH)
export function getCanJoinPlan(params) {
	return api.get("/mutualAid/plan", params,'');
}
// 获取问题列表
export function getQuestionList(params) {
	return api.get("/cms/question/list", params);
}
// 查看计划条款详情(NOAUTH)
export function getRuleDetail(params) {
	return api.get("/mutualAid/plan/contractTerms/detail", params);
}
// 获取已支付未激活的保障单列表
export function getBeneficiaryList(params) {
	return api.get("/mutualAid/noActiveList", params);
}
// 未激活(待实名认证)保障人数
export function notActived(params) {
	return api.get("/mutualAid/beneficiary/notActived", params);
}
//激活互助保障单
export function actived(params) {
	return api.post("/mutualAid/activate", params,'激活中...');
}
// 已加入保障人数
export function hasJoindActived(params) {
	return api.get("/mutualAid/beneficiary/activated", params);
}
// 激活成功后的详情
export function activateSuccessDetail(params) {
	return api.get("/mutualAid/order/detail?"+params);
}

// 加入互助，即点每人 1000 元按钮
export function joinHelpBtn(params,id) {
	return api.post("/mutualAid/join/"+id.planId,params,'加载中');
}
// 获取支付信息
export function buildPayInfo(params) {
	return api.get("/pay/buildPayInfo",params);
}
// 获取JSPAY支付信息
export function PayInfo(params) {
	return api.get("/pay/wxPay/buildPayInfo/"+params.orderId);
}
// 获取支付结果
export function PayResult(params) {
	return api.get("/pay/result?orderId="+params);
}
// 获取待支付订单详情
export function noPayDetails(params) {
	return api.get(`/mutualAid/orderForm/detail?orderFormId=${params}`);
}
// 产权人实名认证申请
export function confirmCardSign(params) {
  return api.post("/eleSign/individual/telecom3Factors/apply",params);
}
// 产权人确认实名
export function certification(params) {
  return api.post(`/eleSign/individual/telecom3Factors/verify?verifyCode=${params.verifyCode}&flowId=${params.flowId}`);
}
// 我的订单
export function mineOrder(params) {
  return api.get("/mutualAid/orderForm/list?scope="+params);
}
// 取消订单
export function cancelOrder(params) {
   return api.deletes("/mutualAid/cancel/"+params);
}
// 光伏电站详情
export function getAgenment(params) {
	return api.get("/pv/station/pact/"+params);
}
// 预约订单获取时间
export function appoinmentTime(params) {
	return api.get(`/sys/dict/detail/${params}`);
}
// 确认预约接口
export function appoinmentConfirm(params) {
	return api.post(`/order/subscribe`,params);
}
// 预约查询结果
export function appoinmentResult(params) {
	return api.get(`/order/subscribe/result?planId=${params.planId}&stationId=${params.stationId}`);
}
// 查看协议详情
export function xieyiDetails(params) {
	return api.get(`/mutualAid/plan/contractTerms/detail?id=${params}`);
}



